import random
a =input("请问您想随机选几次:")
cs =int(a)
for i in range(cs):
    while 1:
        r = random.randint(0, 3)
        y = random.randint(0, 3)
        g = random.randint(0, 6)
        if r+y+g == 8:
            print("第{0}次选择:红球{1}个黄球{2}个绿球{3}个".format(i,r,y,g))
            break
        else:
            pass
